{extend name="index_layout"/}
{block name="main"}
<form class="layui-form" method="post">
    <input type="hidden" name="id" value="{$data.id}">
    <div class="layui-form-item">
        <label class="layui-form-label">问题类型</label>
        <div class="layui-input-block">
            <select name="question_cate_id" lay-verify="required">
                <option value="">请选择问题类型</option>
                {if !empty($question_cate_list)}
                {foreach $question_cate_list as $key}
                <option
                <?php if( $key['id'] == $data['question_cate_id']){ ?>
                selected
                <?php }?>
                value="{$key.id}"  name="question_cate_id">
                {$key.name}
                </option>
                {/foreach}
                {/if}
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">问题</label>
        <div class="layui-input-block">
            <input type="text" name="question" value="{$data.question}"  lay-verify="required" autocomplete="off" placeholder="问题"
                   class="layui-input">
        </div>
    </div>

    <div class="layui-form-item" style="">
        <label  class="layui-form-label">内容详情</label>
        <div  class="layui-input-block">
            <script type="text/plain" class="js-ueditor" name="answer"
                    style="width:900px;height:200px;position: relative;z-index: 1 !important;"
                    id="content">{$data.answer|raw}</script>
            <!--            <textarea type="text/plain" class="js-ueditor" name="content"-->
            <!--                      style="width:900px;height:200px;position: relative;z-index: 1 !important;"-->
            <!--                      id="content" value="{$data.detail}"></textarea>-->
        </div>
    </div>

<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">回答</label>-->
<!--        <div class="layui-input-block">-->
<!--            <textarea name="answer" class="layui-textarea"> {$data.answer}</textarea>-->
<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item">
        <label class="layui-form-label">排序</label>
        <div class="layui-input-block">
            <input type="text" name="sort" value="{$data.sort}" lay-verify="required|Number" autocomplete="off" placeholder="数值越大,位置靠前"
                   class="layui-input">
        </div>
    </div>


    <div class="layui-form-item layer-footer">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
{/block}
{block name="script"}
<script type="text/javascript">
    layui.use('yznForm', function () {
        var yznForm = layui.yznForm;
        yznForm.bindevent($("form.layui-form"));
    });
</script>
{/block}